﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using KeRui.Common;

public partial class Manage_Seller_AdClickInfo : System.Web.UI.Page
{
    protected DataTable dt = new DataTable();
    private KeRui.BLL.AdClick bllAdClick = new KeRui.BLL.AdClick();
    ManageErrMsg nsb = new ManageErrMsg();
    protected int AdID = -1;
    protected int Type = 1;
    protected int scaleMin = 100;
    protected int scaleMax = 100;
    protected Random r = new Random();
    #region 分页
    //public int PageSize = 3;                               //每页数量
    //public int PageIndex = PageRequest.GetInt("page", 1);   //请求的页码
    //public int PageCS = PageRequest.GetInt("cs", -1);       //记录总数
    //public int PageCount = 0;                               //总页数
    //public string PageShow = "";                            //分页显示
    #endregion 分页
    protected void Page_Load(object sender, EventArgs e)
    {
        Type = PageRequest.GetInt("type", 1);
        AdID = PageRequest.GetInt("ID",-1);

        scaleMin = PageRequest.GetInt("scaleMin", 100);
        scaleMax = PageRequest.GetInt("scaleMax", 100);

        if (scaleMax < scaleMin)
        {
            scaleMax = scaleMin + 10;
        }

        if(AdID ==-1)
        {
            nsb.AddErr("错误访问。"); nsb.ChkErr();
        }
        dt = bllAdClick.GetList(-1,-1, Type, AdID).Tables[0];
        
        ////总数
        //if (PageCS == -1)
        //    PageCS = bllAdClick.GetCount(Type, AdID);
        ////总页数
        //if (PageCS % PageSize == 0)
        //    PageCount = PageCS / PageSize;
        //else
        //    PageCount = PageCS / PageSize + 1;
        ////分页显示
        //PageShow = ManageHelper.showSplitPage("AdClickInfo.aspx?cs=" + PageCS.ToString() + "&page={0}&type=" + Type + "&ID=" + AdID, PageIndex, PageSize, PageCS);

    }
}
